After installing this module and testing it out by uploading a test video, Drupal's cron broke. It stopped running automatically and when I tried to run it manually, it just output a white page. No errors, no nothing. The video never did upload to Youtube or was processed. I uninstalled the module and erased all my test data and the cron started working again.

CommentFileSizeAuthor
#14 358534.patch2.17 KBjhedstrom
#13 358534.patch1.65 KBjhedstrom

Comments

jhedstrom’s picture

Are there any watchdog messages?

mediabounds’s picture

The only message in watchdog is:

Cron run exceeded the time limit and was aborted.

jhedstrom’s picture

Hmm. Do you get any odd messages at admin -> reports -> status?

mediabounds’s picture

No, everything checks out just fine!

jhedstrom’s picture

Could you provide an export of the content type/field settings? (The Content Copy module bundled with CCK enables you to do this).

mediabounds’s picture

Here are my settings:

$content[type] = array (
'name' => 'Video',
'type' => 'video',
'description' => 'Upload video!',
'title_label' => 'Title',
'body_label' => 'Description',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => false,
'sticky' => false,
'revision' => false,
),
'upload' => '1',
'teaser_field' => 0,
'old_type' => 'video',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'comment' => '0',
'comment_default_mode' => '4',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '3',
'comment_anonymous' => 0,
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '0',
);
$content[fields] = array (
0 =>
array (
'label' => 'Video',
'field_name' => 'field_video',
'type' => 'video_upload',
'widget_type' => 'video_upload_widget',
'change' => 'Change basic information',
'weight' => '-3',
'file_extensions' => 'mov avi mp4 mpa mpe mpg mpeg qt wmv',
'file_path' => '',
'max_filesize_per_file' => '',
'max_filesize_per_node' => '',
'use_browser_upload_method' => false,
'auto_delete_rejected_videos' => 0,
'display' =>
array (
'default_width' => '480',
'default_height' => '295',
'small_width' => '240',
'small_height' => '148',
'thumb_width' => '128',
'thumb_height' => '72',
'related_videos' => 0,
'autoplay' => 0,
'fullscreen' => 1,
),
'default_title' => 'Untitled',
'default_title_sync' => '1',
'default_description' => 'http://www.mediabounds.com',
'default_description_sync' => '1',
'default_keywords' => 'mediabounds,dan,pfeiffer',
'default_keyword_sync' => '2',
'developer_tags' => '',
'video_category' => 'Entertainment',
'description' => '',
'group' => false,
'required' => 0,
'multiple' => '0',
'list_default' => '1',
'force_list_default' => '1',
'show_description' => '0',
'op' => 'Save field settings',
'module' => 'video_upload',
'widget_module' => 'video_upload',
'columns' =>
array (
'fid' =>
array (
'type' => 'int',
'not null' => false,
),
'list' =>
array (
'type' => 'int',
'size' => 'tiny',
'not null' => false,
),
'data' =>
array (
'type' => 'text',
'serialize' => true,
),
'id' =>
array (
'type' => 'varchar',
'length' => '32',
),
'status' =>
array (
'type' => 'int',
'default' => 3,
'sortable' => true,
),
'status_ts' =>
array (
'type' => 'int',
'length' => '11',
'sortable' => true,
'default' => '0',
),
),
'display_settings' =>
array (
'weight' => '-3',
'parent' => '',
'label' =>
array (
'format' => 'hidden',
),
'teaser' =>
array (
'format' => 'thumb_link',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
);
$content[extra] = array (
'title' => '-5',
'body_field' => '-2',
'menu' => '-4',
'attachments' => '-1',
);

mediabounds’s picture

Aha!! I edited my cron.php file to force it to show php errors. When I ran it, I discovered that it was running out of memory. So I edited my htaccess file to allow 100M of memory (is that unsafe?) and tried to run cron and it ran successfully. Now, however, I have the following error:

Video Upload: error c8 <?xml version='1.0' encoding='UTF-8'?>yt:validationinvalid_charactermedia:group/media:description/text() 0 while attempting to upload a video.

mediabounds’s picture

Status: Active » Fixed

And FCKeditor was the culprit. It was trying to send html data to the description. Is there anyway to parse out the html it what is sent to youtube?

jhedstrom’s picture

Title: Cron will not run » Strip HTML (from TinyMCE or FCKEditor) out of data transmitted to YouTube
Status: Fixed » Active

I'm glad you got this working. Bumping up the memory limit isn't really dangerous, it just means on a really busy site you're more likely to have the server run out of memory if it's getting hammered by uploads.

Regarding FCKEditor, this has been the source of many support requests, so I'll look into a way to strip it's gibberish out of the data sent to youtube.

smooshy’s picture

subscribe

j0rd’s picture

I'm getting the same XML error you've mentioned.

Video Upload: error c8 <?xml version='1.0' encoding='UTF-8'?><errors><error><domain>yt:validation</domain><kode>invalid_character</kode><location type='xpath'>media:group/media:description/text()</location></error></errors> 0  while attempting to upload a video.

this happens when I run cron and it attempts to upload videos

<kode> tags are actually <code> tags

j0rd’s picture

As a temp fix I'm simply disabling TinyMCE on the description when I submit video_upload nodes. That seems to resolve the issue for me.

I think you should simply strip the tags before you submit to YouTube

http://th.php.net/strip_tags

jhedstrom’s picture

Assigned: Unassigned » jhedstrom
Status: Active » Needs review
StatusFileSize
new1.65 KB

Attached is a patch that should fix this. It will be committed to dev shortly.

jhedstrom’s picture

StatusFileSize
new2.17 KB

Here's a patch that adds an additional strip_tags call, to strip tags out in event of appending the node body to the youtube description.

jhedstrom’s picture

Status: Needs review » Fixed

Committed to 6.x dev version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.